#pragma once

class StateMachine;
#include "..\..\EdgeGameCore\BaseGameComponent.h"
#define BACKBUFFER_WIDTH	1580
#define BACKBUFFER_HEIGHT	900

/***********************Temporary********************************/
#include "..\..\EdgeMath\Vectors.h"
#include "..\..\EdgeGraphics\ConstantBuffer.h"
#include "..\..\EdgeGraphics\Lighting\LightingEngine.h"
/****************************************************************/
class Camera;

class Game : public BaseGameComponent
{
	// allows DEMO_APP to instanciate the singleton
	// of game
	friend class DEMO_APP;

	// state machine for game logic
	StateMachine* sMachine;

	// hwnd instance
	HWND hwnd;

	/***********************Temporary********************************/
	LightingEngine* lighting = nullptr;
	/****************************************************************/
	
	// singleton instance for the game
	static Game* instance;

	// indicates that the game is running
	bool running = true;
	// indicates that the window currently has focous
	bool windowFocoused = true;


public:
	Game(HWND, const char* exePath);
	virtual ~Game();
	virtual void Update(float dt) override;

	virtual void Draw(void) override;

	bool getWindowFocoused(void) const { return windowFocoused; }

	// THIS FUNCTION SHOULD NOT BE CALLED OUTSIDE MAIN.CPP!!!
	void setWindowFocoused(bool value) { windowFocoused = value; }

	// singleton accessor
	static Game* GetInstance(void);
};